package com.example.thebasics;

import android.media.MediaPlayer;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;

public class main extends Activity {
//
	MediaPlayer logoMusic;
    @Override
    //protected void onCreate(Bundle savedInstanceState) {
      //  super.onCreate(savedInstanceState);
    protected void onCreate(Bundle TravisIsAwesome) {
         super.onCreate(TravisIsAwesome);
         
        //setContentView(R.layout.activity_main);
        setContentView(R.layout.splash);
       logoMusic = MediaPlayer.create(main.this, R.raw.sound_splash);
       logoMusic.start();
        
        Thread logoTimer = new Thread(){
        	public void run(){
        		try{
        		sleep(2000);
        		Intent menuIntent= new Intent("com.example.thebasics.MENU");
        		startActivity(menuIntent);   
        		}
        	//	catch {
        		catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
        			
        	//	}
        		finally{
        			finish();
        		}
        	}
        };
        logoTimer.start();
    }


    @Override
	protected void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
		logoMusic.release();
	}


	@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
    
}